package com.yanqu.road.server.manager.tomb.astar;

public class Node {

    public Node(Coordinate coordinate, Node parent, int g, int h) {
        this.coordinate = coordinate;
        this.m_g = g;
        this.m_h = h;
        this.parent = parent;
    }

    private Coordinate coordinate;

    private Node parent;

    //角色到该节点的距离
    private int m_g;
    //到终点的估价距离
    private int m_h;

    public Coordinate getCoordinate() {
        return coordinate;
    }

    public void setCoordinate(Coordinate coordinate) {
        this.coordinate = coordinate;
    }

    public Node getParent() {
        return parent;
    }

    public void setParent(Node parent) {
        this.parent = parent;
    }

    public int getM_g() {
        return m_g;
    }

    public void setM_g(int m_g) {
        this.m_g = m_g;
    }

    public int getM_h() {
        return m_h;
    }

    public void setM_h(int m_h) {
        this.m_h = m_h;
    }

    public int getM_f() {
        return m_g + m_h;
    }



}
